Talk:ReferencePopups
Colors Your TODO says you want to fine-tune the colors a little more. Can I interest you in my Colors library? -- pecoes 11:36, November 03, 2012 (UTC) Pop-up disappear speed Is there any way you can make the pop-ups disappear faster? They seem to take too long to disappear, and sometimes they take almost an entire minute to disappear after you stop hovering over them. Is there any way to change how long it takes for the window to disappear, as sometime it disappears quickly and other times it take minutes to disappear? :They disappear using the same hover delay setting that creates them, but they only disappear after having been interacted with. You need to hover your mouse over the popup's body then hover out of it to trigger the close timeout otherwise it will stick open. This is intentional. Lunarity 00:59, November 13, 2012 (UTC) :I've made it configurable now. Just open the popup settings and untick "Use sticky hovering". Lunarity 02:38, November 13, 2012 (UTC) ::Thanks, that makes it much better. Though for some reason when the popup goes above the reference the arrow underneath it works right, but the rest of the box is quite a few pixels too high. :::Unfortunately, that was a bug I introduced while trying to fix another one; I thought I fixed it already (Try a Ctrl+F5). The problem causing that is that the popup has the WikiaArticle CSS class applied to it, which it needs because it's attached to #WikiaMainContent, not #mw-content-text, and only stuff which is descended from a .WikiaArticle gets bold, italics, underline, list items, etc. If your wiki has custom CSS on .WikiaArticle then it may interfere with the popup and screw up the height on it. I've made the unset CSS more robust, let me know if it's still happening (I'd like a link to an example page if possible, so I check the CSS cascade that's causing it). Lunarity 04:31, November 14, 2012 (UTC) ::::It isn't working. Here is a link to an effected page: http://nintendo.wikia.com/wiki/SSB4 (Reset indent) What browser are you using? It's working correctly (on that page) for me in Firefox 16, Chrome 22 and Internet Explorer 9. Can you give me a screenshot? Lunarity 06:14, November 15, 2012 (UTC) :I am using Firefox (I'm not sure what version, but a newer one). Here is a screenshot. File:Popup Error.png ::I suspect the problem is what I mentioned before about .WikiaArticle, since it looks exactly the same as what I was seeing before I fixed it. The baffling part is that I have CSS that is supposed to fix it but your browser is apparently using the old stylesheet without the CSS reset code. I suspect the server has served you the old version of the sheet with a week/month/year expiry instead of 10 minutes during that time it was really flaky and broken. Clearing your cache should fix it. you try testing with Chrome or Internet Explorer? ::In any case, I've inlined the CSS Reset into the JavaScript, hopefully that should fix it for you. Lunarity 04:57, November 17, 2012 (UTC) :::It works in IE, but after doing the normal (F5) cache clear it still hasn't fixed. ::::Okay, so it is specific to your Firefox installation. You must be stuck with an old version of the JavaScript as well. There isn't anything I can do if your browser is refusing to update to the latest version of the code. Did you try using "Private Browsing" mode in Firefox? That disables the cache which will make it clearer if that is the problem. ::::I recommend you fully clear your cache as you're probably going to have problems with other scripts as well until you do. Hit Firefox > History > Clear Recent History. Change the "Time Range" drop list to "Everything" then expand the "Details" section and untick all the boxes except "Cache" then hit "Clear Now". After that, do an F5. If it's still doing it, repeat the clear cache steps, except the F5, exit Firefox, open it again then try it. Lunarity 22:31, November 18, 2012 (UTC) :::::I tried all of those things, but for some reason none of them worked. (Reset indent) Other than that, there's Firefox > Options. Go "Advanced", change to "Network" and click the "Clear Now" button in the Cache section. Then refresh. If that doesn't work either then I'm out of ideas. I still don't think there's anything wrong with the script itself since I'm using Firefox as well and it works fine for me. Lunarity 02:24, November 20, 2012 (UTC) :I was able to reproduce the problem on a different computer, I'm not sure why but there seems to be a random problem with processing min-height: auto; correctly, I've switched it to min-height: 0; instead. Hopefully that should fix it, it's rather inexplicable why this happened in the first place though. The docs for min-height say "auto" should behave the same as zero unless the element has "display: flex", which it doesn't (shouldn't)... Lunarity 02:41, November 20, 2012 (UTC) ::It looks like the change you made worked. Thanks! How to put on non-Wikia wiki? I was looking to put this code on a non-wikia wiki to use for the pop-up template. So I was wondering how exactly do you add it to a non-wikia wiki? : I don't think you can. The code uses Wikia's MediaWiki modifications to function, including $.showModal, window.importArticle and direct calls to load.php?mode=articles. I could modify it to be less dependent on Wikia's features, but the configuration UI is largely unsalvageable, there is no hope for making that work without a major rewrite (which is currently prevented by the fact that jquery.ui.dialog doesn't work at all in Oasis without a custom stylesheet). The other problem is that this script depends on Pecoes' Colors script internally for the color calculations, and that also relies on Wikia's features and is especially dependent on Oasis. : Short version: You'd need to copy /code.js and /code.css, but you'd also need to make significant changes to the loader functions in /code.js, and you'd also need Colors/code.js which needs significant reworking to not be dependent on SASS as well. external Wiki will also need to be running MW1.18 or newer, mw.loader is not optional, being manually upgraded to jQuery 1.8.3 would be good idea as well. : OTOH, it would be possible to fork the code and remove most of the dependencies. I can do that for you if you'd like, it won't take too long as it's mainly a deletion-happy exercise, but you will need to write custom CSS on your wiki to style the popups manually as I will have to gut all the color logic. Lunarity 06:08, December 9, 2012 (UTC) :: I've created a forked version that should work on non-Wikia wikis. User:Lunarity/ReferencePopups-ext.js :: You will need that JavaScript file and ReferencePopups/code.css. Put the CSS file at MediaWiki:ReferencePopups.css on the target wiki you can just paste the contents into your Common.css, whatever works. :: The biggest limitation is that there is no configuration UI at all. It can still be configured, but only by JavaScript (manually putting your settings into window.localStorage by the browser's script console). Lunarity 06:45, December 9, 2012 (UTC) Wordmark problem Hello, I've been using this RefPopup for a while now and really like it a lot. Thanks. Today I noticed a little problem though. Nothing big, but maybe worth noting... when the pop-up appears in front of the Wordmark the part that covers the wordmark disappears. Can this be fixed? -''Zantam03'' (Talk) 14:03, January 3, 2013 (UTC) : The problem is caused by z-indexing and CSS block stacking contexts. I can make it so the popup is on top of almost everything but that risks breaking other things in the CSS rules. The popup is currently descended from WikiaMainContent, I may be able to shift it up to WikiaPage or the body but I'm concerned that it will break the user's and Wikia's CSS rules by preventing some of the classes from applying properly. Lunarity 20:41, January 8, 2013 (UTC) ::It seems that when a ref contains a '&' it won't pop-up, at least not on this page ---''Zantam03'' (Talk) 01:13, January 19, 2013 (UTC) ::: Ampersands are a special character in HTML and are not interpreted literally so it's being encoded by MediaWiki. For whatever reason, someone decided it would be a good idea to encode these as '.26' which is an invalid CSS class thrown into the middle of the id. I've added a workaround for this so it should work now. (The issue was caused by using ampersands in the name field of the ref) Lunarity 17:01, January 19, 2013 (UTC) Infobox Issues Doesn't seem to work within our infoboxes, any way you can take a look and tell us what's broken? Thanks! — Nathan (Peteparker) (Earth-1218) (talk • • ) 05:08, May 14, 2013 (UTC) Global.js Will this work on global.js? 09:51, September 26, 2013 (UTC) :Why not?' ~ UltimateSupreme' 11:58, September 26, 2013 (UTC) ::The article only mentioned "MediaWiki:Common.js". 12:04, September 26, 2013 (UTC) Lockdown Mode I tried to enable the lockdown mode on my wiki by copying-and-pasting the code provided with no luck. I tried placing both before and after script importing, cleared the cache, waited 10, 15 minutes but the code wouldn't take effect. After I removed it from my Common.js, the script almost instantly worked. Any ideas of the problem here? DEmersonJMFM 03:18, November 23, 2013 (UTC) Colors Is there any way I can change the color of the reference popup? I don't want to use the colors of theme of my wiki User:Relikz 4:27, January 26, 2014 (UTC) :Yes. Simply inspect the reference popup, and add the appropriate styles to the wiki's CSS. -452 (talk) 15:03, July 13, 2014 (UTC) Suggestion Suggestion: Allow popup references inside popup references, by attaching the handler to the popped-up reference. -452 (talk) 21:33, January 11, 2015 (UTC)